package hate.test;

import java.util.Calendar;
import java.util.Date;

public class Study0612 {

    public static void listUsers( Long... ids) {
        System.out.println("ids:"+ids[1]);
    }
    public static boolean eqs( String str) {
        return java.util.Objects.equals(str," ");
    }

    public static void main(String args[]){
        Date dd =new Date("2020/05/14");
        System.out.println(getWeekOfDate(dd));
    }
    /**
     * 获取当前日期是星期几<br>
     *
     * @param date
     * @return 当前日期是星期几
     */
    public static String getWeekOfDate(Date date) {
        String[] weekDays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
        if (w < 0)
            w = 0;
        return weekDays[w];
    }
}
